package com.cmas.platform.domain;

import lombok.Data;
import com.aidex.common.core.domain.BasePlusEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aidex.common.utils.log.annotation.FieldRemark;
import com.aidex.common.utils.log.annotation.LogField;
import com.aidex.common.annotation.Excel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 版块管理对象 section
 * @author su
 * @email 1218819874@qq.com
 * @date 2023-03-14
 */
@Data
public class Section extends BasePlusEntity
{
    private static final long serialVersionUID = 1L;

    /** 地区ID */
    @Excel(name = "地区ID")
    @LogField
    @FieldRemark(name = "地区ID",field = "regionId")
    private String regionId;

    /** 类型（0代表固定 1代表自定义） */
    @Excel(name = "类型", dictType = "section_type")
    @NotBlank(message = "版块类型不允许为空")
    private String type;

    /** 版块名称 */
    @Excel(name = "版块名称")
    @NotBlank(message = "版块名称不允许为空")
    @Size(max = 32, message = "版块名称长度不能超过32个字符")
    @LogField
    @FieldRemark(name = "版块名称",field = "name")
    private String name;

    /** 版块编码 */
    @Excel(name = "版块编码")
    @NotBlank(message = "版块编码不允许为空")
    @LogField
    @FieldRemark(name = "版块编码",field = "code")
    @Size(max = 32, message = "版块编码长度不能超过32个字符")
    private String code;

    /** 版块排序 */
    @Excel(name = "版块排序")
    @LogField
    @FieldRemark(name = "版块排序",field = "sort")
    private String sort;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("regionId", getRegionId())
            .append("type", getType())
            .append("name", getName())
            .append("code", getCode())
            .append("sort", getSort())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
